<?php foreach($languages as $lang): ?>
    <div class="<?php echo $divClass; ?>">
        <label><?php echo $lang->name; ?></label>
        <input class="<?php echo $inputClass; ?>" type="<?php echo $inputType; ?>" name="<?php echo $inputName; ?>[<?php echo $lang->code; ?>]<?php if($inputIsArray){echo '[]';} ?>" value="<?php echo $this->getValue($lang->code); ?>" />
    </div>
<?php endforeach; ?>